Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nitsche checkpoint particles #1192

Merged
merged 6 commits into from
Jul 10, 2024
Merged

Nitsche checkpoint particles #1192

merged 6 commits into from
Jul 10, 2024

Conversation

blaisb
Copy link
Contributor

@blaisb blaisb commented Jul 9, 2024

Description

  • In the previous version of the code, the lethe-fluid-nitsche solver would crash when trying to checkpoint a simulation that was already restarted. This was because the checkpointing mechanism was poorly implemented. Indeed, instead of checkpointing the particle_handler itself, the solver would actually re-load the triangulation of the solid object and generate new particles. This is not a good approach and is not maintanable.

Solution

  • I fought agaisnt my laziness and re-implemented the thing to actually checkpoint and load the particles. This now enables things to restart multiple times.

Testing

  • To test this feature, I updated the existing restart test so that it actually tries to keep on checkpointing. This would throw an assert in Debug. This does not happen anymore and things are all fine and dandy

Documentation

  • Nothing here needs to be documented, but some issues can be closed because of this.

Miscellaneous (will be removed when merged)

Checklist (will be removed when merged)

See this page for more information about the pull request process.

Code related list:

  • All in-code documentation related to this PR is up to date (Doxygen format)
  • Lethe documentation is up to date
  • Fix has unit test(s) (preferred) or application test(s), and restart files are in the generator folder
  • The branch is rebased onto master
  • Changelog (CHANGELOG.md) is up to date
  • Code is indented with indent-all and .prm files (examples and tests) with prm-indent

Pull request related list:

  • Labels are applied
  • There are at least 2 reviewers (or 1 if small feature) excluding the responsible for the merge
  • If this PR closes an issue or is related to a project, it is linked in the "Projects" or "Development" section
  • If the fix is temporary, an issue is opened
  • The PR description is cleaned and ready for merge

@blaisb blaisb added Bug Something isn't working Ready for review labels Jul 9, 2024
Copy link
Collaborator

@AmishgaAlphonius AmishgaAlphonius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! I have nothing to add! :)

source/core/solid_base.cc Outdated Show resolved Hide resolved
Copy link
Collaborator

@ghazalemir ghazalemir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Bruno for solving the issue, I have nothing to add.

Co-authored-by: Amishga Alphonius <[email protected]>
@blaisb blaisb merged commit 5c7adf6 into master Jul 10, 2024
8 checks passed
@blaisb blaisb deleted the nitsche_checkpoint_particles branch July 10, 2024 14:26
M-Badri pushed a commit to M-Badri/lethe that referenced this pull request Sep 29, 2024
Description
In the previous version of the code, the lethe-fluid-nitsche solver would crash when trying to checkpoint a simulation that was already restarted. This was because the checkpointing mechanism was poorly implemented. Indeed, instead of checkpointing the particle_handler itself, the solver would actually re-load the triangulation of the solid object and generate new particles. This is not a good approach and is not maintanable.
Solution
I fought agaisnt my laziness and re-implemented the thing to actually checkpoint and load the particles. This now enables things to restart multiple times.
Testing
To test this feature, I updated the existing restart test so that it actually tries to keep on checkpointing. This would throw an assert in Debug. This does not happen anymore and things are all fine and dandy
Documentation
Nothing here needs to be documented, but some issues can be closed because of this.

Co-authored-by: Amishga Alphonius <[email protected]>
Former-commit-id: 5c7adf6
blaisb added a commit that referenced this pull request Sep 30, 2024
Description
In the previous version of the code, the lethe-fluid-nitsche solver would crash when trying to checkpoint a simulation that was already restarted. This was because the checkpointing mechanism was poorly implemented. Indeed, instead of checkpointing the particle_handler itself, the solver would actually re-load the triangulation of the solid object and generate new particles. This is not a good approach and is not maintanable.
Solution
I fought agaisnt my laziness and re-implemented the thing to actually checkpoint and load the particles. This now enables things to restart multiple times.
Testing
To test this feature, I updated the existing restart test so that it actually tries to keep on checkpointing. This would throw an assert in Debug. This does not happen anymore and things are all fine and dandy
Documentation
Nothing here needs to be documented, but some issues can be closed because of this.

Co-authored-by: Amishga Alphonius <[email protected]>
Former-commit-id: 5c7adf6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants